#ifndef OMG_IDDS_CORE_STATUS_STATUSIMPL_HPP_INCLUDED_
#define OMG_IDDS_CORE_STATUS_STATUSIMPL_HPP_INCLUDED_

/* Copyright (c) 2009-2010, Real-Time Innovations, Inc.
 * Copyright (c) 2010, Object Management Group, Inc.
 * All rights reserved.
 *
 * Redistribution and use in source and binary forms, with or without
 * modification, are permitted provided that the following conditions are met:
 * 
 * - Redistributions of source code must retain the above copyright notice,
 *   this list of conditions and the following disclaimer.
 * - Redistributions in binary form must reproduce the above copyright
 *   notice, this list of conditions and the following disclaimer in the
 *   documentation and/or other materials provided with the distribution.
 * - Neither the names of the above copyright holders nor the names of their
 *   contributors may be used to endorse or promote products derived from
 *   this software without specific prior written permission.
 * 
 * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
 * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
 * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
 * ARE DISCLAIMED. IN NO EVENT SHALL A COPYRIGHT HOLDER OR CONTRIBUTOR BE
 * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
 * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
 * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
 * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
 * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
 * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
 * POSSIBILITY OF SUCH DAMAGE.
 */


namespace idds { namespace core {


class InconsistentTopicStatusImpl {
public:
    InconsistentTopicStatusImpl() { }

public:
    int32_t total_count() const {
        return total_count_;
    }

    int32_t total_count_change() const {
        return total_count_change_;
    }
protected:
    int32_t total_count_;
    int32_t total_count_change_;
};


class SampleLostStatusImpl {
public:
    SampleLostStatusImpl() { }

public:
    int32_t total_count() const {
        return total_count_;
    }

    int32_t total_count_change() const {
        return total_count_change_;
    }
protected:
    int32_t total_count_;
    int32_t total_count_change_;
};

class SampleRejectedStatusImpl  {
public:
	SampleRejectedStatusImpl()
    : last_reason_(dds::core::status::SampleRejectedState::not_rejected()){ }

public:
    int32_t total_count() const {
        return total_count_;
    }

    int32_t total_count_change() const {
        return total_count_change_;
    }

    dds::core::status::SampleRejectedState last_reason() const {
        return last_reason_;
    }

    const dds::core::InstanceHandle last_instance_handle() const {
        return last_instance_handle_;
    }

protected:
    int32_t total_count_;
    int32_t total_count_change_;
    dds::core::status::SampleRejectedState last_reason_;
    dds::core::InstanceHandle last_instance_handle_;
};


class LivelinessLostStatusImpl  {
public:
    LivelinessLostStatusImpl() { }

public:
    int32_t total_count() const {
        return total_count_;
    }

    int32_t total_count_change() const {
        return total_count_change_;
    }

protected:
    int32_t total_count_;
    int32_t total_count_change_;
};


class LivelinessChangedStatusImpl  {
public:
    LivelinessChangedStatusImpl() { }

public:

    int32_t alive_count() const {
        return alive_count_;
    }

    int32_t not_alive_count() const {
        return not_alive_count_;
    }

    int32_t alive_count_change() const {
        return alive_count_;
    }

    int32_t not_alive_count_change() const {
        return not_alive_count_;
    }

protected:
    int32_t alive_count_;
    int32_t not_alive_count_;
    int32_t alive_count_change_;
    int32_t not_alive_count_change_;
};

class OfferedDeadlineMissedStatusImpl {
public:
    OfferedDeadlineMissedStatusImpl() { }

public:
    int32_t total_count() const {
        return total_count_;
    }

    int32_t total_count_change() const {
        return total_count_change_;
    }

protected:
    int32_t total_count_;
    int32_t total_count_change_;
};

class RequestedDeadlineMissedStatusImpl {
public:
    RequestedDeadlineMissedStatusImpl() { }

public:
    int32_t total_count() const {
        return total_count_;
    }

    int32_t total_count_change() const {
        return total_count_change_;
    }

    const dds::core::InstanceHandle last_instance_handle() const {
        return last_instance_handle_;
    }

protected:
    int32_t total_count_;
    int32_t total_count_change_;
    dds::core::InstanceHandle last_instance_handle_;
};


class OfferedIncompatibleQosStatusImpl {
public:
    OfferedIncompatibleQosStatusImpl() { }

public  :
    int32_t total_count() const {
        return total_count_;
    }

    int32_t total_count_change() const {
        return total_count_change_;
    }

    dds::core::policy::QosPolicyId last_policy_id() const {
        return last_policy_id_;
    }

    const dds::core::policy::QosPolicyCountSeq policies() const {
        return policies_;
    }

protected:
    int32_t total_count_;
    int32_t total_count_change_;
    dds::core::policy::QosPolicyId last_policy_id_;
    dds::core::policy::QosPolicyCountSeq policies_;
};

class RequestedIncompatibleQosStatusImpl {
public:
    RequestedIncompatibleQosStatusImpl() { }

public  :
    int32_t total_count() const {
        return total_count_;
    }

    int32_t total_count_change() const {
        return total_count_change_;
    }

    dds::core::policy::QosPolicyId last_policy_id() const {
        return last_policy_id_;
    }

    const dds::core::policy::QosPolicyCountSeq policies() const {
        return policies_;
    }

protected:
    int32_t total_count_;
    int32_t total_count_change_;
    dds::core::policy::QosPolicyId last_policy_id_;
    dds::core::policy::QosPolicyCountSeq policies_;

};


class PublicationMatchedStatusImpl {
public:
    PublicationMatchedStatusImpl() { }

public:
    int32_t total_count() const {
        return total_count_;
    }

    int32_t total_count_change() const {
        return total_count_change_;
    }

    int32_t current_count() const {
        return current_count_;
    }

    int32_t current_count_change() const {
        return current_count_change_;
    }

    const dds::core::InstanceHandle last_subscription_handle() const {
        return last_subscription_handle_;
    }

protected:
    int32_t total_count_;
    int32_t total_count_change_;
    int32_t current_count_;
    int32_t current_count_change_;
    dds::core::InstanceHandle last_subscription_handle_;
};

class SubscriptionMatchedStatusImpl {
public:
    SubscriptionMatchedStatusImpl() { }

public:
    int32_t total_count() const {
        return total_count_;
    }

    int32_t total_count_change() const {
        return total_count_change_;
    }

    int32_t current_count() const {
        return current_count_;
    }

    int32_t current_count_change() const {
        return current_count_change_;
    }

    const dds::core::InstanceHandle last_publication_handle() const {
        return last_publication_handle_;
    }

protected:
    int32_t total_count_;
    int32_t total_count_change_;
    int32_t current_count_;
    int32_t current_count_change_;
    dds::core::InstanceHandle last_publication_handle_;

};

} }  /* namespace dds::core */

#endif /* OMG_IDDS_CORE_STATUS_STATUSIMPL_HPP_INCLUDED_ */
